package 注解开发控制bean生命周期.main.java.com.itheima;

//import com.itheima.config.SpringConfig;
//import com.itheima.dao.BookDao;
//import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class App {
    public static void main(String[] args) {
//        ApplicationContext ioc=new AnnotationConfigApplicationContext(SpringConfig.class);
//        AnnotationConfigApplicationContext ioc=new AnnotationConfigApplicationContext(SpringConfig.class);
//        BookDao bookDao = (BookDao) ioc.getBean(BookDao.class);
//        BookDao bookDao1 = (BookDao) ioc.getBean(BookDao.class);
//        System.out.println(bookDao);
//        System.out.println(bookDao1);
//        ioc.close();
        //单例对象
//        com.itheima.dao.impl.BookDaoImpl@226a82c4
//        com.itheima.dao.impl.BookDaoImpl@226a82c4

        //非单例对象,通过在对应对象上使用注解scope来直接为非单例对象
//        com.itheima.dao.impl.BookDaoImpl@2b4a2ec7
//        com.itheima.dao.impl.BookDaoImpl@564718df

    }
}
